package com.umeng.soexample.mvp.model;


import com.umeng.lib_core.http.MResponseManager;
import com.umeng.soexample.bean.AddAddressEntity;
import com.umeng.soexample.bean.AddressListEntity;
import com.umeng.soexample.bean.DelAddressEntity;
import com.umeng.soexample.mvp.contract.AddressListFragmentContract;
import com.umeng.soexample.network.API;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * 地址列表fragmentModel
 */
public class AddressListFragmentModel implements AddressListFragmentContract.AddressListFragmentIModel {

    @Inject
    public AddressListFragmentModel() {}

    @Override
    public Observable<AddAddressEntity> addAddressRequest(String request) {
        return MResponseManager.obtainRetrofit(API.class).add_address_request(request);
    }

    @Override
    public Observable<AddressListEntity> addressListRequest(String request) {
        return MResponseManager.obtainRetrofit(API.class).address_list_request(request);
    }

    @Override
    public Observable<DelAddressEntity> delAddressRequest(String request) {
        return MResponseManager.obtainRetrofit(API.class).del_address_request(request);
    }

    @Override
    public void destroy() {

    }
}
